package y2015.day_07.二维点三维;

public class Point {
    int x, y;

    public Point(int x, int y) {
        this.x = x;
        this.y = y;
    }

    public String toString() {
        //编译阶段看引用，执行阶段看内存
        return "(" + "x" + "," + "y" + ")";
    }

    public double distance() {
        return Math.sqrt(x * x + y * y);
    }

}

